#ifndef     __CARGO_H
#define     __CARGO_H

#include <stdint.h>

namespace utils {

struct cargo_t {
    uint8_t row;
    uint8_t col;
    
    uint16_t p1;
    uint16_t p2;
    uint16_t depth1; // 深度1 mm
    uint16_t depth2; // 深度2

    inline void invalid() {
        row = 0;
        col = 0;
    }

    inline bool is_valid() const {
        return (row != 0) && (col != 0);
    }

    inline bool operator==(const cargo_t &other) {
        return (col == other.col) && (row == other.row);
    }
};

}

#endif
